<template>
    <el-tabs
        v-model="activeName"
        type="card"
        class="demo-tabs"
        @tab-click="handleClick"
    >
        <el-tab-pane label="产品概况" name="first" ><produce1></produce1></el-tab-pane>
        <el-tab-pane label="产品特点" name="second"><Produce2></Produce2></el-tab-pane>
        <el-tab-pane label="购买产品" name="third" class="centered-tab-pane">
            <Buyproduce></Buyproduce>
        </el-tab-pane>
        <el-tab-pane label="维修/售后" name="fourth" class="shouhou">
            <Shouhou></Shouhou>
        </el-tab-pane>
    </el-tabs>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import type { TabsPaneContext } from 'element-plus'

import Produce1 from "../components/produce1.vue";
import Produce2 from "../components/produce2.vue";
import Buyproduce from "../components/buyproduce.vue";
import Shouhou from "../components/shouhou.vue"

const activeName = ref('first')

const handleClick = (tab: TabsPaneContext, event: Event) => {
    console.log(tab, event)
}
</script>

<style>
.demo-tabs > .el-tabs__content {
    padding: 32px;
    color: #6b778c;
    font-size: 20px;
    font-weight: 600;
}

.centered-tab-pane {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%; /* 确保父容器占满高度 */
}
.shouhou{
    display: flex;
    justify-content: center;
    align-items: center;

}

</style>